public class Singleleton {
    private volatile Singleleton instance;

    Singleleton getInstance() {
        if (instance == null) {
            synchronized (Singleleton.class) {
                if (instance == null) {
                    instance = new Singleleton();
                    return instance;
                }
            }
        }
        return instance;
    }
}
